<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<div th:fragment="header1" class="row">
    <nav class="navbar navbar-default">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" th:href="@{/}">新冠疫情网<span class="sr-only">(current)</span></a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li><a th:href="@{/news-info/show}">新闻资讯 </a></li>
                    <li><a th:href="@{/topic-info/showList}">论坛</a></li>
                    <li><a th:href="@{/refutation-info/show}">疫情辟谣</a></li>
                    <li><a th:href="@{/trip-info/show}">同程查询</a></li>
                    <li><a th:href="@{/fact-info/show}">疫情百科</a></li>
                    <li><a th:href="@{/hospital-info/show}">定点医院</a></li>
                    <!--<li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">疫情百科 <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="#">Action</a></li>
                            <li><a href="#">Another action</a></li>
                            <li><a href="#">Something else here</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">Separated link</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">One more separated link</a></li>
                        </ul>
                    </li>-->
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <li th:if="${not #strings.isEmpty(session.loginUser) && session.loginUser.getRole() eq 1}"><a th:href="@{/main.do}">后台管理</a></li>
                    <li th:if="${not #strings.isEmpty(session.loginUser) && session.loginUser.getRole() eq 0}"><a th:href="@{/user-info/toUpdate(id=${session.loginUser.getUserId()})}">个人信息管理</a></li>
                    <li><a th:href="@{/tologin}" th:if="${#strings.isEmpty(session.loginUser)}">登录</a></li>
                    <li><a href="#" th:if="${not #strings.isEmpty(session.loginUser)}">欢迎你：[[${session.loginUser.userName}]]</a></li>
                    <li><a th:href="@{/user-info/userLogout.do}" th:if="${not #strings.isEmpty(session.loginUser)}">退出登录</a></li>
                </ul>
            </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
    </nav>
</div>
<div th:fragment="header2" class="row" style="background-color: #006AC2;margin-bottom: 3px;">
    <div class="col-md-6 logo"><a th:href="@{/}" style="text-decoration: none;color: whitesmoke">新冠疫情网</a></div>
    <div class="col-md-2 col-md-offset-4">
        <p>欢迎你：<span th:if="${not #strings.isEmpty(session.loginUser)}" class="label label-info">[[${session.loginUser.userName}]]</span></p>
        <a th:href="@{/user-info/userLogout.do}" class="btn btn-danger">退出登录</a>
    </div>
</div>
</html>